package com.atguigu.wordcount.outputformat;

import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper;

import java.io.IOException;

/**
 * @ClassName OutputFormatMapper
 * @DeScription OutputFormatMapper
 * @Author 剧情再美终是戏
 * @Date 2019/11/19 18:36
 * @Version 1.0
 **/
public class OutputFormatMapper extends Mapper<LongWritable, Text, String, NullWritable> {

    @Override
    protected void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {
        context.write(value.toString() + "\r\n", NullWritable.get());
    }
}
